home *** CD-ROM | disk | FTP | other *** search
- Path: argonet.co.uk!argbd86
- From: Charlotte Tomlinson <eeyore@argonet.co.uk>
- Newsgroups: comp.lang.c++
- Subject: Re: Borland 3.0 - Newbie question
- Date: Mon, 01 Apr 1996 23:29:50
- Organization: UnipalmPIPEX server (post doesn't reflect views of UnipalmPIPEX
- Distribution: world
- Message-ID: <internews46B841C45E@argonet.co.uk>
- References: <4jpfo5$1js@druid.borland.com>
- Reply-To: Charlotte Tomlinson <eeyore@argonet.co.uk>
- NNTP-Posting-Host: am201.du.pipex.com
- X-Newsreader: VTi Voyager InterNews 0.15 for Acorn RISC OS (Patched by RA)
-
- mstave@wpo.borland.com (Matt Stave) wrote:
- > To make an application that you can run, you need to produce an .exe.
- >
- > What are xxx and yyy?
- >
-
- Matt,
-
- I have several errors of a similar nature.
-
- (Before I go any further, many thanks if you can help!!)
-
- I get one as "Linker error: Undefined symbol str::operator delete(void
- near*) in module REVDICT.CPP".
- The other, complains about a template I set up, with just different
- classes used as the list node type, an example is "Linker error: Undefined
- symbol dllist<fuzzyel>::dllist<fuzzyel>(const dllist<fuzzyel> near&) in
- module REVDICT.CPP".
-
- I have neither of these particular fns anywhere in the code.
-
- I have the files set up something like this:
-
- ////str.h
- /*...*/
-
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <ctype.h>
-
- class str
- {
- private:
-
- void copy(const char*);
- void copy(char);
- void copy(int);
- void release();
- void concat(const char*, const char *);
-
- protected:
-
- int length;
- char* ptr;
-
- public:
- int getLength() const;
- str();
- str(const char*);
- str(char);
- str(const str&);
- str(int);
- ~str();
- /*=,+,== and others*/
- char& operator[](int) const;
- int operator()(const str&, int) const;
- static void* operator new(size_t);
- static void operator delete(void*);
- };
-
-
- /*fns...*/
-
-
- ////str.cpp
-
- #include "str.h"
-
- void* str::operator new(size_t size)
- {
- void* temp=new char[size];
- if(temp==0)
- puts("Out of heap space");
- return temp;
- }
-
- void operator delete(void* p)
- {
- delete p;
- }
-
-
- char& str::operator[](int index) const
- {
- if(index<0||index>=length)
- {
- putchar('\a');
- static char dummy;
- dummy='\0';
- return dummy;
- }
- return ptr[index];
- }
-
-
- ////fuzzyel.h
-
- #include "str.cpp"
-
- class fuzzyel {
- private:
-
- str element;
- int membership;
-
- public:
-
- fuzzyel (str string="", int memval=100)
- : element(string),membership(memval) {};
- fuzzyel(const fuzzyel&);
- ~fuzzyel();
-
- /*some fns*/
- };
-
- /*fns*/
-
-
-
- ////dllist.h
-
- #include <iostream.h>
- #include<stdlib.h>
-
- /*..*/
-
- //node & list
-
- template <class T> class node
- {
- public:
-
- T data;
-
- node<T> *next;
- node<T> *prev;
-
- /*...*/
- };
-
- template <class T> class dllist : public node<T>
- {
- node<T> *start, *end;
- void copy(const dllist<T>);
-
- public:
-
- dllist() {start=end=NULL;}
- dllist(const dllist<T>&);
- /*some list fns*/
- };
-
-
- ////fuzzyset.h
-
- /*..*/
- #include "fuzzyel.h"
- #include <stdio.h>
- #include "dllist.cpp"
-
- class fuzzyset {
- private:
- dllist<fuzzyel> members;
-
- public:
- fuzzyset() {}
- fuzzyset(const fuzzyset&);
- fuzzyset(const fuzzyel&);
- ~fuzzyset() {}
- /*fns*/
- };
-
- /*fns*/
-
-
-
- ////revdict.cpp
-
-
- #include "fuzzyset.h"
- #include <stdio.h>
-
-
- class attribute
- {
- private:
- str name;
- fuzzyset set;
-
- public:
- attribute();
- attribute(str);
- attribute(str,fuzzyset);
- attribute(const attribute&);
- /*fns*/
- };
-
- /*other fns, similar classes & main()*/
-
-
-
-
-
- ... *^รบ!"**$%%$**^^!*&**+++** Tagline Heaven.
- --
- -----------------------------------------------------------------------------
- | Charlotte Tomlinson | Mediocrity know nothing higher than itself, |
- | eeyore@argonet.co.uk | but talent instantly recognises genius. |
- |---------------------------------------------------------------------------|
- --------- Now WWWebbed up at http://www.argonet.co.uk/users/eeyore/ ---------
-
-